/**
 * @file Name: 4.cpp
 * @author: Fenghuwuyu
 * @version: 1.0
 * @brief:
 * @date: Fri 09 Apr 2021 03:22:39 AM PDT
 */

#include<iostream>
int main()

/**
 * Abstract Types:
 *
 * we design a more abstract version of Vector called Container:
 *
 * class Container
 * {
 *	pubilc:
 *		virtual double& operator[](int) = 0; // pure virtual function
 *		virtual in size() const = 0; // const member function
 *		virtual ~Container(){} // destructor
 * };
 *
 * keyword virtual menas "may be redefined later in a class derived from this one."
 *
 * the curious "=0" syntax says the function is "pure virtual";that is, some class derived from Container must define the function.(remember, is "must")
 *
 * A class with a pure virtual function is called an abstract class.
 *
 * Commonly, abstract classed have no constructor, after all, it does not have any data to initialize.
 * On the other hand, abstract classes have at least a virtual destructor.
 *
 *
 * This Container can be used like this:
 * void use(Container& c)
 * {
 *		const int ze = c.size();
 *
 *		for(int i=0;i!=sz;++i)
 *			std::cout << c[i] << '\n';
 * }
 *
 *
 * class Vector_Container:public Container
 * {
 *		private:
 *			Vector v;
 *		public:
 *			Vector_Container(int s):v(s){}
 *			~Vector_Container(){}
 *
 *			double& operator[](int i){return v[i];}
 *
 *			int size() const{return v.size();}
 * }
 *
 * The ":public" can be read as "is derived from" or "is a subtype of".
